<template>
  <div class='body'>
    <!--底部-->
    <el-footer class="footer">
      <div class="footer-content">
        <el-row type="flex" class="row-bg" justify="space-between">
          <el-col :span="6">
            <div class="left-title">站点信息</div>
            <div class="title-content">
              <p>文章总数：{{this.$store.getters.getblogCount}} 篇</p>
              <p>访问总数：{{this.$store.getters.getviewCount}} 次</p>
              <p>评论总数：{{commentCount}} 条</p>
            </div>
          </el-col>
          <el-col :span="15">
            <div class="null-item"></div>
          </el-col>
          <el-col :span="10">
            <div class="right-content">
              <div class="qq">
                <div class="qq-title">联系作者</div>
                <div class="qq-content">
                  <p>Email：2513050886@qq.com</p>
                  <p> QQ：2513050886</p>
                </div>
              </div>
              <div class="wx">
                <div class="wx-title">微信</div>
                <img class="wx-img" src="../assets/image/wx.jpg"/>
              </div>
            </div>
          </el-col>
        </el-row>
      </div>
    </el-footer>
    <div class="record">
      <div class="record-img">
        <img src="../assets/image/bah.webp" />
      </div>
      <div>
        <a href="https://beian.miit.gov.cn/" class="record-text">粤ICP备2021166849号</a>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Foot',
  data () {
   return {
    viewCount: 0,
    commentCount: 0
   }
  },
  mounted() {
    this.initData()
  },
  methods:{
    //初始化底部数据
    initData(){
      const _this = this
      //请求获取总评论数
      this.axios.get('/comment/getCommentCount').then(resp=>{
        // console.log(resp)
        _this.commentCount = resp.data
      }).catch((error) => {
        // console.log(error)
      })
    }
  }
}
</script>

<style scoped>
  .body{
    min-height:150px;
    width: 100%;
  }

  .footer{
    color: #fff;
    background-color:#424242;
    min-height: 150px;
  }

  .footer-content{
    text-align: center;
  }

  .left-title{
    font-size: 26px;
    margin-top:25px;
  }

  .title-content{
    font-size: 15px;
    line-height: 10px;
  }

  .null-item{
    font-size: 15px;
  }

  .right-content{
    display:flex;
  }

  .qq{
    flex:4;
    margin-top:40px;
  }

  .qq-title{
    font-size: 26px;
  }

  .qq-content{
    font-size: 15px;
    line-height: 10px;
  }

  .wx{
    font-size: 18px;
    flex:5;
  }

  .wx-title{
    margin-top: 10px;
    font-size:18px
  }

  .wx-img{
    width: 100px;
    height: 100px;
    margin:10px 0;
  }

  .record{
    width: 100%;
    height: 30px;
    line-height: 10px;
    background-color: black;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .record-img{
    width: 20px;
    height: 20px;
    margin-right: 5px;
  }

  .record-img img{
    width: 100%;
    height: 100%;
  }

  .record-text{
    font-size: 0.5rem;
    color: rgb(249, 249, 249);
  }
</style>